/**
 * @brief MCP2003 ADC driver header
 * @author Gilad Avidov
 */
#ifndef MCP3002_H_INCLUDED
#define MCP3002_H_INCLUDED

//__bit __at (0x83)     MCP3002_CS
#define MCP3002_CS       (P1_2)
#define MCP3002_START    (0x40)
#define MCP3002_SGL_DIFF (0x20)
#define MCP3002_CHNL     (0x10)
#define MCP3002_MSB      (0x08)

void mcp_init(bit is_single);

unsigned short mcp_read(bit chnl);

#endif // MCP3002_H_INCLUDED
